private ["_do_exit","_exitj"];

_do_exit = false;
if (d_HALOWaitTime > 0) then {
	if (position player distance FLAG_BASE < 15) then {
		if (d_next_jump_time > time) then {
			_do_exit = true;
			(format [localize "MSG_DOM_JUMPWAIT", round ((d_next_jump_time - time)/60)]) call XfHQChat;
		};
	};
};
if (_do_exit) exitWith {};

_ok = createDialog "XD_ParajumpDialog";
d_global_jump_pos = [];
onMapSingleClick "closeDialog 0;d_global_jump_pos = _pos;onMapSingleClick ''";

waitUntil {!dialog || !alive player};
if (alive player) then {
	if (count d_global_jump_pos > 0) then {
		_realpos = [d_global_jump_pos, 200] call XfGetRanJumpPoint;
		[_realpos] execVM 'client\jump.sqf';
	};
} else {
	if (dialog) then {closeDialog 0};
};
sleep 0.512;
onMapSingleClick "";
